prem_setting_table <- function(){
  
  rownames <- c("Medical costs",
                "",
                "Administrative costs (t-1)",
                "", 
                "$N$", 
                "$1^{st}$-stage F-stat", 
                "$R^{2}$")
  
  table <- read.csv("../release/prem_setting/tables/pr_paper_best_guess_ra_s_wsimcost.csv")

  MakeLatexTableAdj(
    startcodelist = list(
      "\\begin{table}[H]",
      "\\begin{singlespace}",
      "\\begin{centering}",
      "\\begin{tabular}{lcccc}",
      "&  &  &  & \\tabularnewline",
      "\\hline", 
      "\\hline", 
      "& \\textbf{(1)} & \\textbf{(2)} & \\textbf{(3)} & \\textbf{(4)}\\tabularnewline",
      "\\hline"), 
    tableinnardslist = list(
      table[1:4, 2:5], 
      table[5, 2:5],
      table[6:7, 2:5]), 
    rownames = list(
      rownames[1:4], 
      rownames[5],
      rownames[6:7]),
    stderrlist = list(T, F, F),
    tableinnardsroundvec = c(3, 0, 3), 
    inbetweencodelistlist = list(
      list("\\hline", 
            "Year FEs &  &  &  & $\\checkmark$\\tabularnewline",
            "Payer-Year FEs &  & $\\checkmark$ & $\\checkmark$ & \\tabularnewline"), 
      list("\\hline", 
           "$\\psi$ &  &  &  & \\tabularnewline")
      ),
    endcodelist = list(
      "\\hline", 
      "\\hline", 
      "\\end{tabular}",
      "\\par\\end{centering}",
      "\\end{singlespace}",
      "\\caption{Premium setting equation} \\label{tab:main_t_premium_set}",
      "\\begin{singlespace}",
      "\\end{singlespace}",
      "\\end{table}")
  )
}
